1. Field of the Invention
The present invention relates to compression and decompression of sampled signals, particularly to applying coordinated control of two or more control parameters for the compression operations.
2. Description of Related Art
In a signal processing system, it may be necessary to apply lossy compression to the signal samples in order to accommodate a system constraint. Constraints, including limited storage capacity or limited data transfer bandwidth, can prevent storage and/or transfer of the entire bandwidth and dynamic range of the signal samples. Ideally, lossless compression can be applied before data storage or data transfer followed by decompression before additional signal processing. In lossless compression, the decompressed signal samples are identical to the original signal samples. If lossless compression does not give adequate reductions in the bit rate of the compressed signal, then lossy compression may be necessary to provide sufficient reduction of the bit rate. In lossy compression, the decompressed, or reconstructed, signal samples are similar, but not identical to, the original signal samples, creating distortion in the characteristics of the reconstructed signal. Lossy compression creates a tradeoff between the bit rate of the compressed signal samples and the distortion in the reconstructed signal samples. The signal characteristics that may be distorted include, but are not limited to, amplitude, frequency, bandwidth and signal-to-noise ratio (SNR). The availability of computing resources to implement the compression algorithm may also be a system constraint in some instances. In this situation, it is desirable to minimize the computing resources required by either lossless or lossy compression algorithms.
In this discussion, “dynamic range” refers to the range of magnitudes available to the signal samples. Dynamic range can be expressed using a linear scale or a logarithmic scale using units of decibels (dB). The relationship of the logarithmic scale and the linear scale follow the well known equation:dB=20*log2(magnitude),where magnitude is in arbitrary linear units, such as voltage. The present invention focuses on signal samples whose dynamic range is limited by the number of bits per sample. The “6 dB per bit” rule, known to those skilled in the art, indicates that each bit level provides 6 dB of dynamic range for signal samples. For example, eight bits per sample accommodates 48 dB of dynamic range. Initially an analog to digital converter (ADC) converts an original analog signal to digital signal samples. So an initial dynamic range of the signal samples depends on the bit width available from the ADC. A similar relationship exists for the dynamic range of digital samples that are converted from the digital to the analog domain by a digital to analog converter (DAC).
In this discussion, “real time” means a rate that is at least as fast as the sample rate of a digital signal. The term “real time” can be used to describe rates for processing, transfer and storage of the digital signal. The sample rate is the rate at which the ADC forms samples of the digital signal during conversion of an analog signal. When converting a digital signal to an analog signal, the sample rate is the rate at which the DAC forms the analog signal from the samples of the digital signal. The bit rate of an uncompressed sampled, or digital, signal is the number of bits per sample multiplied by the sample rate. The compression ratio is the ratio of the bit rate of the original signal samples to the bit rate of the compressed samples.
Current methods of signal data compression generally identify redundancies in the signal data and reduce the redundancies in order to compress the data. For instance, in transform encoding, an orthogonal transform such as a Discrete Cosine Transform (DCT) is applied to the signal samples to form transform coefficients. The transform coefficients are then encoded in order to compress the data. In this example, the redundancy is represented by the various frequencies of the basis functions of the transform and the corresponding transform coefficients. Compression is achieved by eliminating selected transform coefficients with low values, truncating in the frequency domain by eliminating coefficients above a certain cutoff frequency, reducing the bit width of the transform coefficients and/or quantizing the coefficients with larger step sizes requiring fewer bits per coefficient. After inverse transformation, the reconstructed signal samples are rarely identical to the original signal samples. If there was a truncation in the frequency domain, Gibbs' phenomenon (ripple) can cause unwanted oscillations in the time domain reconstructed signal samples. Amplitude distortion may also result from quantization of the transform coefficients. In the time domain, lossy compression can be accomplished by removing least significant bits (LSBs) or applying coarser quantization so that there are fewer quantization levels per sample resulting in fewer bits per sample. Quantization of time domain samples or frequency domain transform coefficients both cause distortion in the amplitude of the reconstructed signal samples compared with the original signal samples. In addition, applying coarser quantization will also increase quantization noise. Time domain compression methods also identify redundancies in the signal. For example, compression methods based on the well known Huffman encoding calculate a histogram of symbol frequencies. The symbols can correspond to original signal samples or differences between signal samples. Symbols with higher frequencies of occurrence are assigned shorter codes while those with lower frequencies of occurrence are assigned longer codes. Techniques such as prefix coding can be used to ensure that the stream of variable-length codes can be accurately decoded. A sequence of codes corresponding to the sequence of values is bit-packed to form a compressed sequence. A lossy compression method in the time domain includes calculating the differences between samples and coarsely quantizing the differences. When the differences are added back in during decompression, the resulting reconstructed signal samples will have amplitude distortion and increased quantization noise resulting in a lower SNR.
Those skilled in the art recognize that distortion is a result of lossy compression. In information theory, the familiar tradeoff between the compressed signal's bit rate and distortion in the reconstructed, or decompressed, signal is often represented by a rate-distortion curve. It would be advantageous to control which signal characteristics are affected by the distortion introduced by lossy compression. In one application, the bandwidth of the signal samples may be a more critical characteristic to preserve while in another application, the dynamic range may be more critical to preserve by minimizing amplitude distortion. In yet another application, a balance between distortion in the dynamic range and bandwidth is advantageous. For example, in spread spectrum signals, such as code division multiple access (CDMA), a narrowband signal is modulated by a spreading sequence such that the signal spectrum is distributed across a wide band of frequencies. For this example, it would be more important to preserve the bandwidth of the spread signal since all of its frequency components are needed for despreading. After despreading the signal back to its original narrowband form, it may be more important to preserve the signal amplitude.
Previous methods for controlling signal compression provide for control of various parameters. The most common control parameter is the bit rate of the compressed signal or the corresponding compression ratio. In the commonly owned U.S. Pat. No. 7,009,533 B1 (the '533 patent), entitled “Adaptive Compression and Decompression of Bandlimited Signals”, dated Mar. 7, 2006, the present inventor describes algorithms for compression and decompression of certain bandlimited signals including control of compression. The '533 patent discloses controlling preprocessor and compressor operations in feedforward and feedback configurations and in response to user input. In the commonly owned U.S. Pat. No. 5,839,100 (the '100 patent), entitled “Lossless and Loss-Limited Compression of Sampled Data Signals”, dated Nov. 17, 1998, the present inventor describes efficient algorithms for compression of sampled data signals without loss or with a controlled amount of loss that affects the signal's dynamic range.
The previous methods do not provide coordinated control over the relative distortions in signal characteristics. Coordinated control allows control of the tradeoffs among the relative signal distortions during signal compression. Improved control will enhance the performance and accuracy of the signal processing system. The present invention fulfills these needs and provides further related advantages as described in the following summary.